package com.itcam.config;

import com.itcam.bean.Cat;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * Author:Cammy.Wu
 * Date:2024-06-16
 * Description:
 */

@Profile("test") //只有指定环境被激活整个类的所有配置才能生效
@Configuration
public class MyConfig {
    @Profile("dev")
    @Bean
    public Cat cat() {
        return new Cat();
    }
}
